package com.jlpay.openapi.demo.fund.deferred;

import com.jlpay.open.jlpay.sdk.java.model.BaseResponse;
import com.jlpay.open.jlpay.sdk.java.model.fund.deferred.request.DeferredActivationCloseRequest;
import com.jlpay.open.jlpay.sdk.java.utils.json.JsonUtils;
import com.jlpay.openapi.demo.JlpayOpenApiService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author chenjunhong
 * @since 2024/12/20
 */
public class DeferredActivationCloseService {

    private static final Logger LOGGER = LoggerFactory.getLogger(DeferredActivationCloseService.class);

    public static void main(String[] args) {
        DeferredActivationCloseRequest deferredActivationCloseRequest = buildDeferredActivationCloseRequest();
        BaseResponse deferredActivationCloseResponse = JlpayOpenApiService.openMerchService()
                .post(deferredActivationCloseRequest, BaseResponse.class);
        LOGGER.info("关停资金管控响应:{}", JsonUtils.toString(deferredActivationCloseResponse));
    }

    private static DeferredActivationCloseRequest buildDeferredActivationCloseRequest() {
        DeferredActivationCloseRequest deferredActivationCloseRequest = new DeferredActivationCloseRequest();
        deferredActivationCloseRequest.setMerchNo("849551860110001");
        return deferredActivationCloseRequest;
    }
}
